home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 10 / The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso / PC_SIGCD / 03 / 1 / DISK0313.ZIP / TMSTRT.BAS < prev    next >
BASIC Source File  |  1984-05-03  |  1KB  |  24 lines

  1. 10 '***************************************************************************
  2. 20 '*                             TMSTRT.BAS                                  *
  3. 30 '***************************************************************************
  4. 40 '*   This program, for use in a BATCH file, writes START TIME to the file, *
  5. 50 '* "TMSTRT.DTA", for use with the program, PRGTIM.DTA, in a BATCH file.    *
  6. 60 '*                                                                         *
  7. 70 '*           Program written by Steve Kent, CIS # 72406,504                *
  8. 80 '*                          v 1.1      05/03/84                            *
  9. 90 '***************************************************************************
  10. 100 H$=MID$(TIME$,1,2) : M$=MID$(TIME$,4,2) :DAT$=DATE$
  11. 110 STARTTIME=VAL(H$)*60 + VAL(M$) : TMHR=VAL(H$)
  12. 120 STARTTIME$="START= " + H$ + ":" + M$
  13. 130 IF TMHR < 12 THEN APM$="A.M."
  14. 140 IF TMHR = 12 AND M$ ="00" THEN APM$="NOON"
  15. 150 IF TMHR = 12 AND M$<>"00" THEN APM$="P.M."
  16. 160 IF TMHR > 12 THEN APM$="P.M." : TMHR=VAL(H$)-12
  17. 170 TMHR$=MID$(STR$(TMHR),2,2)
  18. 180 LOCATE 6,32 : PRINT "DATE: ";DAT$
  19. 190 LOCATE 10,1 :V$="WRITING START TIME":PRINT SPACE$((80-LEN(V$))*.5)+V$
  20. 200 LOCATE 12,1: V$="START TIME= " :                                                PRINT SPACE$((78-LEN(V$+M$+APM$+TMHR$))*.5)+V$+TMHR$+":"+M$+" "+APM$
  21. 210 OPEN "TMSTRT.DTA" FOR OUTPUT AS #1
  22. 220 WRITE #1, DAT$, STARTTIME$, STARTTIME
  23. 230 CLS : SYSTEM
  24.